{include file="kuyou/common/menu" /}
<style>
    form .layer-footer{
        display: none;
    }
</style>
<form class="layui-form layui-search" id="layui-search" method="get">
    <div class="layui-input-inline search_type search_type1" style="min-width: 182px;">
        <input name="stores_id" type="hidden" id="stores_id" value="">
        <div id="stores_ids" class="xm-select-demo"></div>
    </div>
    <div class="layui-input-inline search_type search_type2" style="min-width: 182px;">
        <input type="text" name="goods_code" id="goods_code" value="{$goods_code|default=''}" autocomplete="off" placeholder=" {:__('Product Code')}" class="layui-input">
    </div>
    <div class="layui-input-inline " style="width: 90px">
        <button class="layui-btn layui-btn-sm btn-refresh" type="submit" id="search" data-type="reload">
            <i class="layui-icon"></i> {:__('Search')}
        </button>
    </div>
</form>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="table_box">
        <div class="list" style="overflow-x: auto">
            <table id="purchase_table">
                <tr>
                    <th>{:__('Warehouse')}</th><th>{:__('Product Category')}</th><th>{:__('Product Code')}</th><th>{:__('Product Name')}</th><th>{:__('Product Remarks')}</th><th>{:__('attribute')}</th>
                    <th>{:__('Specification and model')}</th><th>{:__('Company')}</th><th>{:__('System inventory')}</th><th>{:__('Inventory check')}</th><th>{:__('Inventory surplus and inventory deficit')}</th>
                </tr>
                {foreach name="list" item="info" key="k"}
                <tr>
                    <td>
                        <div>
                            <input type="hidden" name="row[stores_id][]" value="{$info.stores.id|htmlentities}">
                            <input type="text" class="goods_note" value="{$info.stores.name|htmlentities}" readonly>
                        </div>
                    </td>
                    <td>
                        <div>
                            <input type="hidden" name="row[goods_type][]" value="{$info.goods_type.id|htmlentities}">
                            <input type="text" class="goods_note" value="{$info.goods_type.supplier_type_name|htmlentities}" readonly>
                        </div>
                    </td>
                    <td>
                        <div>
                            <input type="hidden" name="row[goods_id][]" value="{$info.goods.id|htmlentities}">
                            <input type="text" class="goods_note" value="{$info.goods.goods_code|htmlentities}" readonly>
                        </div>
                    </td>
                    <td>
                        <div>
                            <input type="text" class="goods_note" value="{$info.goods.goods_name|htmlentities}" readonly>
                        </div>
                    </td>
                    <td>
                        <div>
                            <input type="text" class="goods_note" value="{$info.goods.note|htmlentities}" readonly>
                        </div>
                    </td>
                    <td>
                        <div>
                            <input type="hidden" name="row[goods_attr][]" value="{$info.attr_id|htmlentities}">
                            <input type="text" class="goods_note" value="{$info.attr_name|htmlentities}" readonly>
                        </div>
                    </td>
                    <td>
                        <div>
                            <input type="text" class="goods_note" value="{$info.goods.goods_specification_id|htmlentities}" readonly>
                        </div>
                    </td>
                    <td>
                        <div>
                            <input type="text" class="goods_note" value="{$info.unit_name|htmlentities}" readonly>
                        </div>
                    </td>
                    <td>
                        <div>
                            <input type="hidden" name="row[stock][]" value="{$info.stock|htmlentities}">
                            <input type="text" class="stock" value="{$info.stock|htmlentities}" readonly>
                        </div>
                    </td>
                    <td>
                        <div>
                            <input type="number" class="invertory_stock" name="row[invertory_stock][]" value="" data-rule="required">
                        </div>
                    </td>
                    <td>
                        <div>
                            <input type="number" class="profit" name="row[profit][]" value="" readonly>
                        </div>
                    </td>
                </tr>
                {/foreach}
            </table>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
